﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

using CSF.Sales.Data;
using CSF.Sales.BLL;
using CSF.Sales.Service;

namespace CSF.Service.WebShop
{
    // 注意: 使用“重构”菜单上的“重命名”命令，可以同时更改代码、svc 和配置文件中的类名“DeliveryScheduleSvc”。
    public class DeliveryScheduleSvc : IDeliveryScheduleSvc
    {
        public int SetDisable(IEnumerable<int> ids, bool isDisable, string modifyBy)
        {
            DeliveryScheduleBLL bll = new DeliveryScheduleBLL();
            return bll.SetDisable(ids, isDisable, modifyBy);
        }

        public DeliverySchedule GetOneById(int id)
        {
            DeliveryScheduleBLL bll = new DeliveryScheduleBLL();
            return bll.GetOneById(id);
        }

        public bool UpdateById(DeliverySchedule t, int id)
        {
            DeliveryScheduleBLL bll = new DeliveryScheduleBLL();
            return bll.UpdateById(t, id);
        }

        public bool DeleteOneById(int id)
        {
            DeliveryScheduleBLL bll = new DeliveryScheduleBLL();
            return bll.DeleteOneById(id);
        }

        public int DeleteById(IEnumerable<int> ids)
        {
            DeliveryScheduleBLL bll = new DeliveryScheduleBLL();
            return bll.DeleteById(ids);
        }

        public int Insert(DeliverySchedule entity)
        {
            DeliveryScheduleBLL bll = new DeliveryScheduleBLL();
            bll.Insert(entity);
            return entity.Id;
        }

        public DeliverySchedule GetOneByCode(string code)
        {
            DeliveryScheduleBLL bll = new DeliveryScheduleBLL();
            return bll.GetOneByCode(code);
        }

        public List<DeliverySchedule> GetEnable()
        {
            DeliveryScheduleBLL bll = new DeliveryScheduleBLL();
            return bll.GetEnable();
        }

        public List<DeliverySchedule> GetDisable()
        {
            DeliveryScheduleBLL bll = new DeliveryScheduleBLL();
            return bll.GetDisable();
        }

        public List<DeliverySchedule> GetStartsWith(string keyword, bool isDisable)
        {
            DeliveryScheduleBLL bll = new DeliveryScheduleBLL();
            return bll.GetStartsWith(keyword, isDisable);
        }

        public bool Enable(DeliverySchedule t)
        {
            DeliveryScheduleBLL bll = new DeliveryScheduleBLL();
            return bll.Enable(t);
        }

        public bool Disable(DeliverySchedule t)
        {
            DeliveryScheduleBLL bll = new DeliveryScheduleBLL();
            return bll.Disable(t);
        }

        public List<DeliverySchedule> GetAll()
        {
            DeliveryScheduleBLL bll = new DeliveryScheduleBLL();
            return bll.GetAll();
        }
    }
}
